import Vue from 'vue'
import Router from 'vue-router'
import layout from '@/pages/layout'
import page1 from '@/pages/page1'
import page2 from '@/pages/page2'
import page3 from '@/pages/page3'
import page4 from '@/pages/page4'

Vue.use(Router)

export default new Router({
	mode: "history",
  routes: [
    {
      path: '/',
      name: 'layout',
      component: layout,
      children: [
      	{
      		path: '/page1',
      		name: 'page1',
      		component: page1,
      		meta: { openNames: ['1'] }
      	},
      	{
      		path: '/page2',
      		name: 'page2',
      		component: page2,
      		meta: { openNames: ['1'] }
      	},
      	{
      		path: '/page3',
      		name: 'page3',
      		component: page3,
      		meta: { openNames: ['2'] }
      	},
      	{
      		path: '/page4',
      		name: 'page4',
      		component: page4,
      		meta: { openNames: ['3'] }
      	}
      ]
    }
  ]
})
